public class Demo3 {
    public static void main(String[] args) {
        int group[][] = new int[3][];
        group[0] = new int[]{10,20};
        group[1] = new int[]{10,20,30};
        group[2] = new int[]{10,20,30,40};
        int totalSum = 0;   // 公司的总销售额
        //      访问二维数组的元素
        for (int i=0;i<group.length;i++) {
            int groupSum = 0;
            for (int j = 0;j<group[i].length;j++) {
                groupSum += group[i][j];
            }
            System.out.println("第"+(i+1)+"个小组的销售总额为:"+groupSum);
            totalSum += groupSum;
        }
        System.out.println("公司的总销售额"+totalSum);
    }
}